1. Field of the Invention
The invention is related to the field of packet communications, and in particular, to packet processing circuitry.
2. Statement of the Problem
A communication packet is a unit of information that is transferred from one point to another over a communication system. The packet includes a header that indicates to the communication system how the packet should be processed. The primary task when processing a packet is properly routing the packet from the sender to the receiver, although there are many other tasks, such as security, service classification, billing, and address translation. Two common examples of packet communication protocols are the Internet Protocol (IP) and the Asynchronous Transfer Mode (ATM) protocol.
Communication packet processors are integrated circuits that receive, process, and transmit packets. With an insatiable demand for high-speed communications, packet processors are being driven to handle more packets at higher speeds. Compounding the problem is the desire that packet processors offer a more robust set of packet handling options.
To accomplish this difficult task, a packet processor includes a high-speed core processor that executes a packet processing software application. Under software control, the core processor processes the header of an incoming packet to retrieve context information from a memory for the packet. The context information specifies how the packet should be handled with respect to routing, security, and other areas. Under software control, the core processor then processes the context information to control packet handling.
To retrieve the desired context information, the core processor must associate the packet header with the memory locations that hold the desired context information. The core processor must then retrieve the desired context information from the associated memory locations. If the core processor modifies the context information, it must then write the modified context information back to the correct memory locations. This process is repeated for each packet, so the core processor is repeatedly associating headers with memory locations, retrieving context information, and writing modified context information to the memory locations.
This task is further complicated by the increase in processing options that can be applied to a packet. As the processing options increase, so does the size of the context information that specifies these options. The core processor must now handle increasingly larger amounts of context information, or the core processor must selectively retrieve only the desired data contained in the context information.
With increasing speeds and processing requirements, the core processor is becoming over-tasked. The result is either a loss of speed or processing options. One solution is simply to add higher-speed processors. Unfortunately, this solution adds too much cost to the underlying system.
A Content-Addressable Memory (CAM) is an integrated circuit that can search a list at high speed to provide a corresponding result. The CAM is configured with a list of selector entries. Each selector entry has a corresponding result. When the CAM receives an input selector, it searches the list of selector entries for a match. The search is accomplished at high speed by concurrently comparing each selector entry to the input selector. Unfortunately, CAMs have not been effectively applied to help solve the above problem.
The invention helps solve the above problems with packet processing circuitry that relieves the core processor of the complexity of updating selected context information in memory. A look-up engine operates with a CAM to selectively retrieve context information from memory for the core processor. If the core processor modifies the context information while processing a packet, then the look-up engine automatically stores the modified context information in memory for the core processor. The circuitry can operate at high speeds, and core processor capacity is freed up for other processing tasks.
In some examples of the invention, the packet processing circuitry comprises a look-up engine and a processor. The look-up engine transfers a selector to a CAM and receives a corresponding result from the CAM. The look-up engine retrieves a context structure from a context memory based on the result and transfers the context structure to the processor. The processor receives and processes the context structure to control handling of the communication packet. The processor modifies the context structure and transfers the modified context structure to the look-up engine. The processor generates an update instruction and transfers the update instruction to the look-up engine. The look-up engine receives the update instruction and the modified context structure. The look-up engine automatically writes the modified context structure to the context memory in response to the update instruction.
For a subsequent communication packet, the look-up engine may transfer the selector to the CAM and receive the corresponding result from the CAM. The look-up engine may retrieve the modified context structure from the context memory based on the result and transfer the modified context structure to the processor. The processor may receive and process the modified context structure to control handling of the subsequent communication packet.
The processor may process header information from the communication packet to generate and transfer the selector to the look-up engine. The circuitry may include the CAM that receives and processes the selector for a match and transfers the result corresponding to the match. The processor, look-up engine, and CAM may be configured on a single integrated circuit. The context structure may relate to network address translation, billing, packet forwarding, packet security, or packet classification. The context structure may include a pointer to shared data. The look-up engine may retrieve the shared data using the pointer. The look-up engine may automatically write modified shared data using the pointer in response to the update instruction. The processor may receive and process the context structure to modify the shared data in the context structure.
The context structure may be included in a summation block comprised of other context structures. The look-up engine may retrieve the summation block from the context memory based on the result and transfer the summation block to the processor. The processor may receive and process the summation block to control handling of the communication packet. The processor may modify the summation block and transfer the modified summation block to the look-up engine. The look-up engine may receive the modified summation block and automatically write the modified summation block to the context memory in response to the update instruction.